﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="corpuserdist.aspx.cs" Inherits="LTJ.WebPage.UserManage.user.corpuserdist" %>
<%@ Import Namespace="LTJ.Common"%>
<%@ Register TagPrefix="dyj" Namespace="LTJ.Control" Assembly="LTJ.Control" %>
<%@ Register TagPrefix="dyjU" TagName="ajaxcorpuserlist" Src="~/datacontrol/ajaxcorpuserlist.ascx"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>用户管理</title>
    <link href="../css/comm.css" type="text/css" rel="stylesheet" />
    <link href="../css/lightview.css" type="text/css" rel="stylesheet" />
    <script src="../js/jquery.js" type="text/javascript"></script>
    <script src="../js/prototype.js" type="text/javascript"></script>
    <script src="../js/scriptaculous.js?load=effects" type="text/javascript"></script>
    <script src="../js/lightview.js" type="text/javascript"></script>
    <script src="../js/effects.js" type="text/javascript"></script>
    <script src="../js/ajaxhelper.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript" src="../js/common.js"></script>
    <script src="../js/jquery-choose.js" type="text/javascript"></script>
    <script type="text/javascript">
        function Check(form, checked) {
            CheckByName(form, 'cid', checked);
            checkedEnabledButton(form, 'cid', 'pause');
        }
        function formcheck() {
            if (event.keyCode == 13) {
                document.getElementById("check").focus();
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="adnr">
	    <div class="adnrt">
		    <p>会员名：<dyj:TextBox runat="server" ID="lname_txt" Width="100" MaxLength="10" onkeydown="formcheck()"></dyj:TextBox>&nbsp;</p>
            <p>姓名：<dyj:TextBox runat="server" ID="rname_txt" Width="100" MaxLength="10" onkeydown="formcheck()"></dyj:TextBox>&nbsp;</p>
            <p>电话：<dyj:TextBox runat="server" ID="phone_txt" Width="100" MaxLength="20" onkeydown="formcheck()"></dyj:TextBox>&nbsp;</p>
        </div>
        <div class="adnrt">
            <p>当前状态：
            <asp:RadioButtonList runat="server" ID="cur_status_txt" RepeatDirection="Horizontal" RepeatLayout="Flow">
                <asp:ListItem Selected="True" Text="正常" Value="1"></asp:ListItem>
                <asp:ListItem Text="禁用" Value="0"></asp:ListItem>
                <asp:ListItem Text="不限" Value="-1"></asp:ListItem>
            </asp:RadioButtonList>&nbsp;</p>
            <p><dyj:Button runat="server" ID="check" Text="查询" ButtonImgUrl="../images/search.gif"/></p>
	    </div>
	    <ul class="adnrt mar_top">
            <li>
            <div class="zi2 popxg" style="z-index:101">
                        <p class="ip1" id="ajaxcorpuserdatalist_str" style="width200px"></p>
                        <input type="hidden" id="ajaxcorpuserdatalist_value" name="ajaxcorpuserdatalist_value" value=""/>
					    <span class="an"></span>
					    <div class="cn" style="width:400px;" id="ajaxcorpuserdatalist_div">
                            <dyjU:ajaxcorpuserlist runat="server" ID="acorpuserlist" />
					    </div>
				    </div>
		    &nbsp;&nbsp;<dyj:Button ID="setuser" runat="server" Text="分配"/>
            </li>
	    </ul>
	    <div class="adnr3">
        <dyj:datagrid id="DataGrid1" runat="server" PageSize="10">
	       <Columns>
            <asp:TemplateColumn HeaderText="<input title='选中/取消' onclick='Check(this.form,this.checked)' type='checkbox' name='chkall' id='chkall' />">
                <HeaderStyle Width="20px" />
                <ItemTemplate>
                    <input id="cid" type="checkbox" onclick="checkedEnabledButton(form, 'cid', 'pause')" value="<%# DataBinder.Eval(Container, "DataItem.id").ToString()%>" name="cid">
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:TemplateColumn HeaderText="操作">
              <ItemTemplate>
                    <a href="#" onclick="resetpass('<%# DataBinder.Eval(Container, "DataItem.id").ToString()%>')" class="l_blue">解除</a>
              </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="lname" HeaderText="会员名"></asp:BoundColumn>
            <asp:BoundColumn DataField="rname" HeaderText="姓名"></asp:BoundColumn>
            <asp:BoundColumn DataField="ename" HeaderText="英文名"></asp:BoundColumn>
            <asp:BoundColumn DataField="syspass" HeaderText="初始密码"></asp:BoundColumn>
            <asp:TemplateColumn HeaderText="性别">
              <ItemTemplate>
                    <%# DataBinder.Eval(Container, "DataItem.gender").ToString() == "True" ? "男" : "女"%>
              </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="phone" HeaderText="联系电话"></asp:BoundColumn>
            <asp:BoundColumn DataField="scores" HeaderText="积分"></asp:BoundColumn>
            <asp:BoundColumn DataField="createdate" HeaderText="创建时间"></asp:BoundColumn>
            <asp:TemplateColumn HeaderText="状态">
              <ItemTemplate>
                    <%# DataBinder.Eval(Container, "DataItem.status").ToString()=="1"?"正常":"停用"%>
              </ItemTemplate>
            </asp:TemplateColumn>
          </Columns>
	    </dyj:datagrid>
	    </div>
	    <i class="tp"></i><i class="bt"></i>
    </div>
    <input type="hidden" name="noinfid" id="noinfid" value="<%=adminid%>"/>
    <input type="hidden" name="ruserid" />
    <button id="reuserpass" runat="server" style="display:none"></button>
    </form>
</body>
<script type="text/javascript">
    jQuery(document).ready(function () {
        choose("popxg");
        AjaxHelper.Updater("ajaxcorpuserlist_list.ascx", "ajaxcorpuserdatalist", "noinfid=<%=adminid%>");
    });

    function resetpass(uid) {
        if (confirm("您确定要解除用户绑定吗？")) {
            form1.ruserid.value = uid;
            document.getElementById("reuserpass").click();
        }
    }
</script>
</html>